﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ordlist.aspx.cs" Inherits="weikebuluo.web.wechat.party.ordlist" %>

<html lang="zh-CN"><head>
	<meta charset="utf-8">
	<title>推荐产品</title>
	<base href=".">
   <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
   <meta name="apple-mobile-web-app-capable" content="yes">
   <meta name="apple-mobile-web-app-status-bar-style" content="black">
   <meta name="format-detection" content="telephone=no">
    <style type="text/css">
    body{ background:#e8e9eb; font-size:14px;}
    .bars{ width:100%; background:#f5f7f6; height:40px; }
    .bars a{ text-decoration:none; display:block; color:#FFF; background:#06C; float:left; padding:5px; margin-right:5px; margin-top:6px;margin-left:4px;}
    .bars .cur00,.bars .cur11,.bars .cur22,.bars .cur33,.bars .cur44{ text-decoration:none; display:block; color:#FFF; background:red; float:left; padding:5px; margin-right:5px;}
    .prolist{ margin-bottom:10px;}
    .prolist .thispro{background:#f5f7f6; height:110px; margin:10px 0 10px 0; }
    .prolist table{ padding:8px;}
    .prolist .tip{ color:#000; font-weight:bold;font-size:16px;}
    .prolist .txt{ color:#666; font-size:14px; line-height:19px; height:38px; overflow:hidden;}
    .prolist .link a{text-decoration:none; display:block; color:#FFF; background:green; float:left; padding:2px; margin-right:20px;font-size:14px;}
    .nors{background:#f5f7f6; height:30px; line-height:30px;  width:100%; text-align:center; font-weight:bold;  }
    </style>
</head>
<body><div id="list">

</div>

                
<span id="lb_page"></span>
</body></html>
<script src="../../../scripts/JQuery.min.js" type="text/javascript"></script>
<script type="text/javascript">
    var url = "ordlist.aspx";
    var page = 1;
    $(function () {
        GetList();
    })
    function GetList() {
        $.ajax({
            url: url + "?action=list&uid=<%=Request.QueryString["uid"] %>&wxid=<%=Request.QueryString["wxid"]%>",
            type: "post",
            data: { page: page },
            success: function (msg) {
                var str = '';
                if (msg.replace("[]", "").length > 0) {
                    msg = eval("(" + msg + ")");
                    var total = msg.total;
                    var rows = msg.rows;
                    $(rows).each(function (i) {
                        str += '<div class="prolist"><div class="thispro"><table><tbody><tr>';
                        str += '<td rowspan="3"><img width="118" height="85" src="'+rows[i].ProUrl+'"></td><td class="tip">'+rows[i].ProName+'</td>';
                        str += '</tr><tr><td class="txt">'+rows[i].ProTitle+'</td></tr><tr>';
                        str += '<td class="link"><a href="../vip/duihuan.aspx?uid=<%=Request.QueryString["uid"] %>&wxid=<%=Request.QueryString["wxid"]%>&id='+rows[i].ID+'">了解详情</a>';
                        str += '</tr></tbody></table></div></div>';
                    });
                    if (parseInt(total) > (10 * parseInt(page))) {
                        $("#lb_page").html('<a href="javascript:" onClick="GetPage(' + (parseInt(page) + 1) + ')">下一页</a>');
                    } else {
                        $("#lb_page").html('');
                    }
                    if (parseInt(page) > 1) {
                        $("#lb_page").html('<a href="javascript:" onClick="GetPage(' + (parseInt(page) - 1) + ')">上一页</a>' + $("#lb_page").html());
                    }
                }
                $("#list").html(str);
            }
        });
    }
    function GetPage(p) {
        page = p;
        GetList();
    }
</script>